//
//  ZFBBusinessHeaderTopFlowLayout.m
//  01-ZFB
//
//  Created by My Mac on 2017/6/7.
//  Copyright © 2017年 MyMac. All rights reserved.
//

#import "ZFBBusinessHeaderTopFlowLayout.h"

@implementation ZFBBusinessHeaderTopFlowLayout

- (void)prepareLayout {
    [super prepareLayout];
    CGSize size = self.collectionView.bounds.size;
    CGFloat itemWidth = size.width / 4;
    CGFloat itemHeight = size.height / 2;
    self.itemSize = CGSizeMake(itemWidth, itemHeight);
    self.minimumLineSpacing = 0;
    self.minimumInteritemSpacing = 0;
    // 设置滚动方向
    self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    // 设置 collectionView 的分页
    self.collectionView.pagingEnabled = YES;
    // 隐藏指示器
    self.collectionView.showsVerticalScrollIndicator = NO;
    self.collectionView.showsHorizontalScrollIndicator = NO;
}

@end
